Today’s urbanization has led us to the need of conservation of energy. One of the routine applications is city street lighting system for road safety. This paper proposes a low budget environment friendly street light controller that activates lighting automated to darkness and fog presence. The system uses ESP32 microcontroller interface with LDR to measure light intensity and DHT22 sensor to monitor temperature and humidity. The algorithm for fog detection used a threshold of humidity exceeding 90% and temperature lowering to 20°C. Data from multiple sensors are processed at real time, which is controlling a LED to simulate the status of street light on/off. Parallel to this a code is transmitting environment readings, activation status to a Google Sheet via Wi-Fi (serverless webhook for real time cloud logging). A series of test cases are collected for accuracy and responsiveness of the system. Comparative analysis demonstrates advantages of this system over traditional one. The proposed system is cost effective, scalable, easy to deploy. Future enhancement includes solar power integration, predictive analysis using machine learning, user friendly dashboards. This work gives a feasible effective solution for adaptive urban or rural area street lighting.
Introduction
Modern infrastructure is integrating smart technologies for energy efficiency and public safety. One example is intelligent street lighting, which addresses the limitations of traditional systems that fail to respond dynamically to environmental conditions like fog or low light.
2. Proposed Solution
A low-cost, IoT-based smart lighting system was developed using:
ESP32 microcontroller
LDR (Light Dependent Resistor) for ambient light detection
DHT22 sensor for temperature and humidity
???? Activation Criteria:
Darkness: LDR value > 3000
Foggy Conditions: Humidity > 90% and Temperature < 20°C
If either condition is true, the streetlight (simulated by an LED) is turned ON. Otherwise, it remains OFF.
3. System Architecture
ESP32 reads sensor data and executes local decision logic.
Sends data (temperature, humidity, light, LED status, activation reason) to Google Sheets via Webhook using Google Apps Script.
Offers serverless, cloud-based, real-time data logging for planners and developers.
Designed to be scalable, low-cost, and easily deployable in urban or rural settings.
Campuses/Industries: Retrofitting existing lights with IoT control
7. Future Work
Enhancements may include:
Solar integration for off-grid use
Machine learning for predictive fog detection
Mobile/Web dashboard for real-time control and alerts
Edge computing for local group decisions (mesh networking)
Air quality monitoring to extend relevance for public health
Conclusion
This paper presented a low-cost, IoT-based street light control system that intelligently responds to ambient light and fog conditions using an ESP32 microcontroller, DHT22 sensor, LDR, and serverless cloud logging via Google Sheets. Experimental evaluation in a simulated environment demonstrated reliable fog detection (humidity > 90% & temperature < 20 °C), accurate light sensing (LDR threshold = 3000 ADC), and robust real-time data transmission. Comparative analysis showed significant advantages over traditional PIR- or vision-based systems in terms of cost, simplicity, and scalability. The proposed architecture holds promise for smart city deployments, rural electrification projects, and facility management applications. Ongoing and future work will focus on solar integration, predictive analytics, and user-centric dashboards, further enhancing the system’s autonomy and utility.
References
[1] M. Dehwah, M. Abuzalata, et al., \"Smart street lighting system using IoT and solar energy,\" IEEE Access, vol. 9, pp. 123456–123465, 2021.
[2] K. Ashton, \"That ‘Internet of Things’ Thing,\" RFID Journal, 2009.
[3] A. R. Al-Ali, et al., \"A smart home energy management system using IoT and fog computing,\" Energy Reports, vol. 6, pp. 1449–1456, 2020.
[4] H. Ghayvat, et al., \"Smart Lighting and Data Logging for Smart Cities Using IoT,\" Sustainable Cities and Society, vol. 70, 2021.
[5] B. J. Choi et al., “Design of street lighting control system using zigbee wireless networks,” IEEE International Conference on Advanced Communication Technology (ICACT), 2010.
[6] A. Taneja et al., “Design and implementation of solar powered smart street light system using IoT,” Procedia Computer Science, vol. 167, 2020.
[7] J. Zhai, J. Wu, “Real-Time Fog Detection Based on Road Surveillance Cameras,” Sensors, vol. 19, no. 2, 2019
[8] P. B. Nagar, R. G. Mehta, \"Fog Detection System using Sensor Networks,\" International Journal of Computer Applications, vol. 111, no. 5, 2015.
[9] Espressif Systems. (2023). [ESP32 Series Datasheet].
[10] Google Developers. “Google Apps Script Web Apps.”
[11] Wokwi Docs. \"Simulating ESP32 Projects.
[12] Arduino. Arduino IDE, Version 2.3.2 [Computer software]. Available: https://www.arduino.cc/en/software (accessed May 31, 2025).